﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DillReport.aspx.cs" Inherits="ConsolidationTool.WebParts.Layouts.CReport.Actual.DillReport"
    DynamicMasterPageFile="~masterurl/default.master" %>

<%@ Register TagName="EntitySelector" TagPrefix="RE" Src="~/_controltemplates/ConsolidationTool.WebParts/CommonEntitySelector.ascx" %>
<%@ Register TagName="ExportExcel" TagPrefix="RE" Src="~/_controltemplates/ConsolidationTool.WebParts/PublicExportExcel.ascx" %>
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <div class="fs-webpart-top">
        <RE:EntitySelector ID="commonEntitySelector" runat="server" />
    </div>
    <br />
    <asp:Button ID="GenerateReport" runat="server" Text="Generate Report" OnClick="GenerateReport_Click" />
    <%--<asp:Button ID="ExportReport" runat="server" Text="Export Report" />--%>
    <RE:ExportExcel ID="ExportExcel1" runat="server" />
    <br />
    <br />
    <table id="fs_commontable" class="commontable">
        <thead>
            <tr>
                <td>
                    Account code
                </td>
                <td>
                    Name
                </td>
                <td>
                    Unit
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Label ID="Title_HRM1" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM2" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM3" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM4" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM5" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM6" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM7" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM8" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM9" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM10" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM11" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:Label ID="Title_HRM12" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
                <td>
                    Actual
                </td>
            </tr>
        </thead>
        <asp:Repeater runat="server" ID="reportData">
            <ItemTemplate>
                <tr>
                    <td>
                        <%# Eval("AccountCode") %>
                    </td>
                    <td>
                        <%# Eval("Description") %>
                    </td>
                    <td>
                        <%# Eval("Unit") %>
                    </td>
                    <td>
                        <%# Eval("Type") %>
                    </td>
                    <td align="right">
                        <%# Eval("Month1")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month2")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month3")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month4")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month5")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month6")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month7")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month8")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month9")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month10")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month11")%>
                    </td>
                    <td align="right">
                        <%# Eval("Month12")%>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
    <script type="text/javascript">
        $(function () {

            $("table.commontable tr td span[id*=Label_]").each(function () {
                var self = $(this); self.text(self.text().commafy());
            });

            $("table.commontable td[align=right]").each(function () {
                var self = $(this); self.text(self.text().commafy());
            });
        })
    </script>
</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    <asp:Literal ID="title" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea"
    runat="server">
</asp:Content>
